<?php

	class Bike_Options
	{
		static public function set($Object, array $Options, $ThrowException=True)
		{			foreach($Options as $key => $value)
	        {
	            $methodName = 'set'.ucfirst($key);
	            if(!method_exists($Object, $methodName))
	            {	            	if($ThrowException)
	            	{
	            		Throw new Bike_Exception('Undefined method "'.$methodName.'" of '.get_class($Object));
	           		}
	            }
	            else
	            {
	            	$Object->$methodName($value);
	          	}
	        }
		}
	}
